package day03;

public class OperDemo1 {
    public static void main(String[] args) {
        //单独使用时，a++,b++   都等于a+1   b+1
        /*int a=4,b=5;
        a++;//5
        b++;//6
        System.out.println(a);
        System.out.println(b);
        //++被使用时：a++的值为a,++a的值为a+1
        int c=6,d=5;
        int e=++c;
        int f=d++;
        System.out.println(c);//7
        System.out.println(d);//6
        System.out.println(e);//7
        System.out.println(f);//5
        int t=6,i=6;
        int q=++t;
        int p=i++;
        System.out.println(t);//7
        System.out.println(i);//7
        System.out.println(q);//7
        System.out.println(p);//6
        int v=15;
        int u=v++;
        System.out.println(u);//15
*/
        /*int a=2,b=6;
        int c=--a;
        int d=b--;

        System.out.println(a);//1
        System.out.println(b);//5
        System.out.println(c);//1
        System.out.println(d);//6
        */
     int a=5,b=5;
     int c=--a;
     int d=--b;
        System.out.println(c);//4
        System.out.println(d);//4




    }
}
